From f623e276a148b08d097aaaa0934d7e8a25927b7c Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Sun, 3 Mar 2019 10:16:01 -0700 Subject: [PATCH] clang-tidy performance-unnecessary-value-param on gui. --- gui/gpx.cc | 2 +- gui/mainwindow.cc | 2 +- gui/mainwindow.h | 2 +- gui/map.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/gpx.cc b/gui/gpx.cc index afc2d6fdd..9a4e56d40 100644 --- a/gui/gpx.cc +++ b/gui/gpx.cc @@ -29,7 +29,7 @@ #include "gpx.h" -static QDateTime decodeDateTime(const QString s) +static QDateTime decodeDateTime(const QString& s) { QDateTime utc = QDateTime::fromString(s, "yyyy-MM-dd'T'HH:mm:ss'Z'"); return utc; diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc index 47275a6a2..552ba6247 100644 --- a/gui/mainwindow.cc +++ b/gui/mainwindow.cc @@ -1316,7 +1316,7 @@ void MainWindow::getWidgetValues() // It's also kind of dumb to return the name which SetCombo then looks up, // but there's not a 1:1 correlation between offsets in the combo box and // in the list of formats. -QString MainWindow::getFormatNameForExtension(QString ext) +QString MainWindow::getFormatNameForExtension(const QString& ext) { for (int i = 0; i < formatList_.size(); i++) { QStringList extensions = formatList_[i].getExtensions(); diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 88fc9cb87..31d539927 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -97,7 +97,7 @@ private: UpgradeCheck* upgrade; bool allowBetaUpgrades(); void osLoadDeviceNameCombos(QComboBox*); - QString getFormatNameForExtension(QString ext); + QString getFormatNameForExtension(const QString& ext); protected: void closeEvent(QCloseEvent*); diff --git a/gui/map.cc b/gui/map.cc index f65af3d8b..d4282274f 100644 --- a/gui/map.cc +++ b/gui/map.cc @@ -48,7 +48,7 @@ using std::string; using std::vector; //------------------------------------------------------------------------ -static QString stripDoubleQuotes(const QString s) +static QString stripDoubleQuotes(const QString& s) { QString out; foreach (QChar c, s) { -- 2.30.2